{% extends "../../_basic.twig" %}

{% block header %}
    <script src="../../../src/aux-switch/index.js?v={{random()}}"></script>
    <link rel="stylesheet" href="../../../src/aux-switch/index.css?v={{random()}}">
{% endblock %}

{% block body %}
    <div>      
        <h3>默认 value == of</h3>   
        <aux-switch id="switch"></aux-switch>
        <h3>默认</h3>   
        <aux-switch value="on"></aux-switch>
        <div>
        <aux-button id="getswitchchecked">get switch checked</aux-button>
        <script>
            document.getElementById("getswitchchecked").addEventListener("click", function() {
                alert(document.getElementById("switch").checked);
            });
        </script>        
        </div>
    </div>
{% endblock %}